﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VietThinks.Contract;
using VietThinks.Model;

namespace VietThinks.Service
{
    public class AccountService : IAccountService
    {
        #region "Account"
        public AccountDto GetAcount(string userName)
        {
            using (var repository = DtoRepository<AccountDto, Account >.Open())
            {
                return repository.Get(c => c.UserName == userName ).FirstOrDefault();
            }
        }
        #endregion
        #region "AccountInfo"
        #endregion
        #region "Position"
        public PositionDto GetPosition(int id)
        {
            using (var repository = DtoRepository<PositionDto, Position>.Open())
            {
                return repository.Get(id);
            }
        }
        #endregion
        #region "Staff"
        #endregion
    }
}
